<?php
if (!defined("_INDEX")) { header("Location: /"); die; }

$message_id = $route->getAdminId();
$colname = "show_sender";
$recipient_id = $db->getCell("select `recipient_id` from `messages` where `message_id` = '$message_id' limit 1");
if ($recipient_id == $user->getUserId())
	$colname = "show_recipient";
$db->sendQuery("update `messages` set `$colname` = '0' where `message_id` = '$message_id' limit 1");

goToPage($_SERVER['HTTP_REFERER']);

?>
